<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>

async function async1(){
    console.log("async1 start")
    var a =  await async2()
    console.log(a)
     await async3()
    console.log("async1 end")
}

async function async2(){
    console.log("async2")
}

async function async3(){
    // async 标识的函数，返回一个promise
    console.log("async3")
}

console.log("script start")
async1()

new Promise(function(resolve){
    console.log("promise start")
    resolve(111)
}).then(function(value){
    console.log("promise then 1",  value)
    return 222
}).then(function(value){
    console.log("promise then 2", value)
})
console.log("script end")

</script>
</body>
</html>